package com.cx.mall.seckill.controller;

import com.cx.mall.common.model.seckill.SeckillActivity;
import com.cx.mall.common.utils.ResponseVO;
import com.cx.mall.seckill.service.ISeckillActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lyt
 * @since 2025-08-17
 */
@RestController
@RequestMapping("/seckill/activity")
public class SeckillActivityController {
    @Autowired
    private ISeckillActivityService seckillActivityService;
    @GetMapping("/list")
    public ResponseVO list() {
        List<SeckillActivity> list = seckillActivityService.listActivity();
        return ResponseVO.success(list);
    }

    @GetMapping("/listAllByToday")
    public ResponseVO  listAllByToday() {
        List<SeckillActivity> list = seckillActivityService.listAllByToday();
        return ResponseVO.success(list);
    }


}
